<?php

namespace App\Http\Repository;

use App\Http\Controllers\common\BaseController;
use App\Models\House;

class MapHouseRepository extends BaseController
{

    /**
     * @param $id
     * @return false|string
     * Su ang
     * 房源地图展示
     */
    public static function index($id)
    {
        if ($id==='0'){
            $data = House::with(['direction','propertyType','houseRoom','houseYear','city'])->where('house_type','<>','2')->get()->toarray();
//            $data = House::where('house_type','2')->get()->toArray();
        }else{
            $data = House::with(['direction','propertyType','houseRoom','houseYear','city'])->where('house_type','2')->get()->toArray();
        }
        return self::retJson('200','查询成功',$data);
    }


}
